//
//  ConsultTableViewCell.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/25.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "ConsultTableViewCell.h"
#import "UIColor+Wonderful.h"

@implementation ConsultTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor =[UIColor maroonColor];
      //背景照片
        _background =[[UIImageView alloc]init];
        _background.image = [UIImage imageNamed:@"bg3.png"];
        [self.contentView addSubview:_background];
        [_background release];
        
        //主照片
        _image =[[UIImageView alloc]init];
//        _image .backgroundColor =[UIColor blueColor];
        [_background addSubview:_image];
        [_image release];
        
        //新闻标签
        _type =[[UILabel alloc]init];
//        _type.backgroundColor =[UIColor greenColor];
        _type.textAlignment =NSTextAlignmentCenter;
        _type.font = [UIFont systemFontOfSize:15];
        [_background addSubview:_type];
        [_type release];
        
        
        //新闻标题
        _title =[[UILabel alloc]init];
        _title.font =[UIFont fontWithName:@"Helvetica-Bold" size:15];
//        _title.backgroundColor = [UIColor orangeColor];
        _title.numberOfLines = 4;
        [_background addSubview:_title];
        [_title release];
        
      
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _background.frame = CGRectMake(10, 20, self.contentView.frame.size.width - 20, 110);
    _background.layer.cornerRadius = 6;
    _type.frame = CGRectMake(5, 5, 40, 25);
    _title.frame = CGRectMake(47, 5, 180, 35);
    
    _image.frame = CGRectMake( 230, 5, 120,100);
    
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
